"""
【练习】字典实现
编写一个Python程序，实现一个简单的字典
"""

def dic_info():
    txt = 'hello world hello Python'
    mydic = {}
    for i in txt:
        if i in mydic:
            mydic[i] += 1
        else:
            mydic[i] = 1
    print(mydic)


dic_info()
